home *** CD-ROM | disk | FTP | other *** search
/ Light ROM 1 / LIGHT-ROM 1 (Amiga Library Services)(1994).iso / ffdisks / d879.lha / Millim / Millim.doc next >
Text File  |  1993-05-12  |  6KB  |  119 lines

  1.      The  file  "millim.ps"  contains  PostScript procedures that draw
  2. millimetered  paper with logarithmic or linear scales both on x and y;
  3. the user should write a PostScript program that calls these routines.
  4.  
  5.      To  do this, save millim.ps and edit a copy of that same file; go
  6. to  the end, and replace all the instructions between the lines saying
  7. "%%Page 1 1" and "%%Trailer".  Be careful:  THE CASE IS SIGNIFICANT in
  8. PostScript!
  9.  
  10. - The first line must be "init" (do NOT write the " quotes).
  11. - The  default  paper size is A4; if you are using Letter sized paper,
  12.   insert  here  a single line saying "letter"; if you are using custom
  13.   paper,  insert  here  two  lines  defining  the paper size, like the
  14.   following examples (obey to the case and the spacing!).  You can use
  15.   as  units  inches,  centimeters or millimeters simply typing "in" or
  16.   "cm"  or  "mm";  if  no unit is given the default is a "point", i.e.
  17.   1/72th of an inch:
  18.  
  19.   /xsheet 8.5 in def
  20.   /ysheet 297 mm def
  21.   /xsheet 612    def
  22.  
  23.   ("xsheet"  and "ysheet"  are the names of the variables  holding the
  24.   paper sizes; these statements store into them the correct values).
  25. - The  default  page  orientation  is  portrait; if you need landscape
  26.   orientation, insert here a single line saying "landscape".
  27. - Then  insert  (optional) lines to modify the default values of every
  28.   constant  that do not satisfy your needs; these constants with their
  29.   default values are:
  30.  
  31.   /margin     2 cm def
  32.   /fontsize   10   def
  33.   /bordersize 1    def
  34.   /linesize   0.4  def
  35.   /smallsize  0.01 def
  36.   /bordergray 0    def
  37.   /linegray   0    def
  38.   /smallgray  0    def
  39.  
  40.   and their meaning is the following:
  41. . "margin":   the  drawing is done in a rectangular region at "margin"
  42.   from  the  paper  borders.   Be sure that the axis labels can fit in
  43.   "margin" (these labels are ALWAYS printed).
  44. . "fontsize"  is the height (in points) of the font (Times-Roman) used
  45.   to print the axis labels.
  46. . "bordersize",  "linesize" and "smallsize" are the width in points of
  47.   the  lines  used to draw the frame borders, the normal divisions and
  48.   the  small  subdivisions  (see later for the definitions of the last
  49.   two).  Note that the default smallsize is 0.01 points,  or 1/7200 of
  50.   an inch; lines defined as narrower than the printer resolution, will
  51.   be printed at the printer resolution:  so that, on a 300dpi printer,
  52.   also the default small lines will be 1/300th of an inch wides.
  53. . "bordergray",  "linegray"  and  "smallgray"  are  the gray levels of
  54.   these  same  lines:   they  must  be values from 0 to 1 inclusive, 0
  55.   meaning black and 1 meaning white (i.e.  not drawn).  Be careful: on
  56.   some printers "gray" lines are rendered as dotted lines;  or, "gray"
  57.   and very thin lines  could or could not be drawn  according to their
  58.   position on the page.
  59. - Then define two arrays, "xscale" and "yscale", in the following way:
  60.  
  61.   /xscale [-2 2]     def              OR
  62.   /xscale [0 1 10]   def              OR
  63.   /xscale [0 2 10 4] def
  64.  
  65.   (the  difference  between  these  three  variants  is  the number of
  66.   arguments inside the square brackets; the same works for yscale).
  67. . With two  arguments, the x/y scale is logarithmic; and the arguments
  68.   themselves  are  the  powers  of ten of the beginning and the end of
  69.   these scales:  [-2 2] means from 10^-2 to 10^2.
  70. . With  three  arguments,  the  scale  is  linear;  the first and last
  71.   arguments  are  the minimum and maximum value, and the middle one is
  72.   the  width  of  the  axis  intervals  where  a  label  and a "normal
  73.   division"  line  will be inserted:  [0 1 10] means from 0 to 10 with
  74.   labels and divisions every unit.
  75. . With  four  arguments, the scale is still linear; the meaning of the
  76.   first 3 arguments remains the same, and the fourth one is the number
  77.   of sub-intervals in every "normal division":  for every one of these
  78.   sub-intervals,  a line is drawn but no label is printed.  [0 2 10 4]
  79.   means:  lower value 0, and higher value 10;  labels and normal lines
  80.   every 2 units and each one of these 2 units normal intervals further
  81.   divided in 4 sub-intervals.
  82. - Then, insert a statement saying "drawsheet", to perform the drawing.
  83. - Then,  insert  a  statement saying "showpage", to print the drawing;
  84.   optionally,  if you are proficient in PostScript, you can overimpose
  85.   graphs on the drawing before the "showpage" command.
  86. - Print the file on a PostScript printer.
  87.  
  88.      If you want to print more than 1 page, put at the end of the file
  89. more than a single sequence of commands, from init to showpage.  To be
  90. completely consistent  with the PostScript  programming language,  you
  91. could also edit the statement "%%Pages: 1" in line 5,  substituting to
  92. "1" the actual number  of pages;  and put statements like "%%Page 2 2"
  93. before  every new printed sheet (i.e.  between every showpage  and the
  94. next init). But this may not be actually needed, because most printers
  95. do not really care about these statements.
  96.  
  97.  
  98. -----
  99.  
  100.      Enjoy!
  101.  
  102.      The  file millim.ps with its content is public domain, and can be
  103. spread and modified as you want.
  104.  
  105.      Comments  and  modifications  are  gladly  accepted  via EMail to
  106. loreti@padova.infn.it
  107.  
  108.                                                 MLO
  109. -----
  110.  
  111.  
  112. Maurizio Loreti (MLO) - Ham: I3NOO
  113. Work:     University of Padova, Department of Physics
  114.           Via F. Marzolo, 8 - 35131 Padova - Italy
  115. DECnet:   VAXFPD::LORETI, i.e. 39330::LORETI
  116. BITNET:   LORETI@IPDINFN
  117. INTERNET: loreti@padova.infn.it
  118. BIX:      mloreti
  119.